<%@page pageEncoding="UTF-8" isELIgnored="false"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@taglib prefix="f" uri="http://www.slim3.org/functions"%>
<%@taglib prefix="m" uri="http://taglibs.mobylet.org/" %>
<html>
<head>
<title>Twitter</title>
</head>

<body style="border: 2px solid black;">
<div>
	<table style="background: none repeat scroll 0% 0% #A9A9A9; width: 100%;">
	<tbody>
	<c:forEach var="tweet" items="${tweets}" varStatus="status">
       <c:choose>
         <c:when test="${status.count % 2 == 0}">
           <c:set var="color" value="#FFFFFF;" />
         </c:when>
         <c:otherwise>
           <c:set var="color" value="#F5F5F5;" />
         </c:otherwise>
       </c:choose>
	<tr>
		<td style="background: none repeat scroll 0% 0% <c:out value="${color}"/> padding: 5px;">
			${status.count}<br />
			<img src="${tweet.user.profileImageURL}" width="40" height="40">
		</td>
		<td style="background: none repeat scroll 0% 0% <c:out value="${color}"/> padding: 5px;">
			${f:h(tweet.text)}
		</td>
	</tr>
	</c:forEach>
	</tbody>
	</table>
</div>
<br>
</body>
</html>
